﻿package {

	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	import flash.ui.*;

	
	public class forsterage extends MovieClip {

		public function forsterage() {
			// constructor code
			left.addEventListener(MouseEvent.CLICK,clicking2);
			right.addEventListener(MouseEvent.CLICK,clicking1);

		}
		
		public function clicking1(event:MouseEvent) {
			if (pic4.x > 360){
			pic1.x = pic1.x - 120;
			pic2.x = pic2.x - 120;
			pic3.x = pic3.x - 120;
			pic4.x = pic4.x - 120;

			}
		}

		public function clicking2(event:MouseEvent) {
			if (pic1.x < 0){
			pic1.x = pic1.x + 120;
			pic2.x = pic2.x + 120;
			pic3.x = pic3.x + 120;
			pic4.x = pic4.x + 120;
			}
		}


	}
}